package Iterator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
public class iteratortext {
    public static void main(String[] args) {
        Map<String,String>hashMap=new HashMap<String,String>();
        hashMap.put("key1", "value1");
        hashMap.put("key2", "value2");
        hashMap.put("key3", "value3");
        Iterator<String> iterator= hashMap.keySet().iterator();
        while(iterator.hasNext()){
            String tem=iterator.next();
            System.out.println(tem+"--->"+hashMap.get(tem));
        }
    }


}
